package com.loyin.model;

import java.util.Date;

import com.et.ar.ActiveRecordBase;
import com.et.ar.annotations.Column;
import com.et.ar.annotations.HasOne;
import com.et.ar.annotations.Id;
import com.et.ar.annotations.Table;

/**
 * 下载网址
 * 
 * @author 刘声凤 2011-11-11
 */
public class DownloadUrlVo
{
	public Long id;
	public long userid;
	public long websiteid;
	public String title;
	public String url;
	/** 收录时间 */
	public String recordtime;
	/** 是否已经下载 */
	public int isdownload=0;
	/** 符合关键字个数 */
	public int keycount;
	public long isread;
	
	public int isNew=0;
	

	public Long getId()
	{
		return id;
	}

	public void setId(Long id)
	{
		this.id = id;
	}

	public String getTitle()
	{
		return title;
	}

	public void setTitle(String title)
	{
		this.title = title;
	}

	public String getUrl()
	{
		return url;
	}

	public void setUrl(String url)
	{
		this.url = url;
	}

	public String getRecordtime()
	{
		if(recordtime!=null && recordtime.length()>10)
		{
			return recordtime.substring(0,10);
		}
		return recordtime;
	}

	public void setRecordtime(String recordtime)
	{
		this.recordtime = recordtime;
	}

	public int getIsdownload()
	{
		return isdownload;
	}

	public void setIsdownload(int isdownload)
	{
		this.isdownload = isdownload;
	}

	public long getUserid()
	{
		return userid;
	}

	public void setUserid(long userid)
	{
		this.userid = userid;
	}

	public long getWebsiteid()
	{
		return websiteid;
	}

	public void setWebsiteid(long websiteid)
	{
		this.websiteid = websiteid;
	}

	public int getKeycount()
	{
		return keycount;
	}

	public void setKeycount(int keycount)
	{
		this.keycount = keycount;
	}

	public long getIsread()
	{
		return isread;
	}

	public void setIsread(long isread)
	{
		this.isread = isread;
	}

	public int getIsNew()
	{
		if(recordtime!=null)
		{
			String todayStr=new java.text.SimpleDateFormat("yyyy-MM-dd").format(new Date());
			if(recordtime.startsWith(todayStr))
				isNew=1;
		}
		return isNew;
	}

	public void setIsNew(int isNew)
	{
		this.isNew = isNew;
	}

}
